package cn.cvs.pojo;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName("sys_user")
public class SysUser implements Serializable {

  @TableId(type = IdType.AUTO)
  @TableField("usr_id")
  private Long usrId;
  @TableField("usr_name")
  private String usrName;
  @TableField("usr_Password")
  @JsonIgnore
  private String usrPassword;
  @TableField("usr_Role_Id")
  private Long usrRoleId;
  @TableField("usr_Flag")
  private Integer usrFlag;

  @TableField(exist = false)
  public String roleName;

  @JsonIgnore
  @TableField(exist = false)
  public SysRole role;

  public SysUser() {

  }

  public SysUser(String usrName, String usrPassword, Integer usrFlag , Long usrRoleId) {

    this.usrName = usrName;
    this.usrPassword = usrPassword;
    this.usrFlag=usrFlag;
    this.usrRoleId = usrRoleId;
  }

}
